package cn.net.xinyi.xs.controller {
	
	import cn.net.xinyi.xs.model.LoadChartsProxy;
	import cn.net.xinyi.xs.model.LoadOrgansProxy;
	import cn.net.xinyi.xs.view.ColumnChartMediator;
	import cn.net.xinyi.xs.view.OrgansListMediator;
	import cn.net.xinyi.xs.view.PieChartMediator;
	
	import org.puremvc.as3.multicore.interfaces.INotification;
	import org.puremvc.as3.multicore.patterns.command.SimpleCommand;
	
	public class RamsStartupCommand extends SimpleCommand {
			
		override public function execute(note:INotification):void {
			facade.registerProxy(new LoadOrgansProxy());
			facade.registerProxy(new LoadChartsProxy());
			var app:rams = note.getBody() as rams;
			facade.registerMediator(new OrgansListMediator(app.organList));
			facade.registerMediator(new ColumnChartMediator(app.charts));
			facade.registerMediator(new PieChartMediator(app.pieChart));
		}
	}
}